package com.niiwoo.civet.trade.service.dubbo.fanlitou;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import com.niiwoo.civet.trade.dao.entity.ProjectBorrowerSummary;
import com.niiwoo.civet.trade.dao.entity.ProjectLendRecord;
import com.niiwoo.civet.trade.dao.mapper.ProjectBorrowerPlanNewMapperExt;
import com.niiwoo.civet.trade.dao.mapper.ProjectBorrowerSummaryMapperExt;
import com.niiwoo.civet.trade.dao.mapper.ProjectLendRecordMapperExt;
import com.niiwoo.civet.trade.dto.ProjectBorrowerPlanNewDTO;
import com.niiwoo.civet.trade.dto.common.CardNiuLoanResult;
import com.niiwoo.civet.trade.dto.common.ProjectDTO;
import com.niiwoo.civet.trade.dto.common.ProjectSummaryDTO;
import com.niiwoo.civet.trade.dto.request.fanlitou.FanLiTouRequestDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.CardNiuLoanCreditAmountDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.CardniuLoanConfigDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.RepayPlanInfo;
import com.niiwoo.civet.trade.dto.response.fanlitou.FanLiTouInvestResponseDTO;
import com.niiwoo.civet.trade.enums.TradeConfigEnum;
import com.niiwoo.civet.trade.service.cardniu.CardNiuLoanDubboService;
import com.niiwoo.civet.trade.service.fanlitou.FanLiTouDubboService;
import com.niiwoo.civet.trade.service.local.cardniu.CardNiuLoanLocalService;
import com.niiwoo.civet.trade.service.local.cardniu.CardNiuRefundLocalService;
import com.niiwoo.civet.trade.service.local.configure.TradeConfigLocalService;
import com.niiwoo.civet.trade.service.local.fanlitou.FanLiTouLocalService;
import com.niiwoo.civet.trade.service.local.project.ProjectLocalService;
import com.niiwoo.civet.user.dto.response.cardniu.CardNiuCreditInfoDTO;
import com.niiwoo.civet.user.service.asset.AssetCreditDubboService;
import com.niiwoo.tripod.provider.exception.BizException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.FastDateFormat;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * Created by dell on 2018/2/24.
 * Description：civet-app
 */
@Slf4j
@Service(version = "1.0.0",validation = "true")
public class FanLiTouDubboServiceImpl implements FanLiTouDubboService {

    @Autowired
    private FanLiTouLocalService fanLiTouLocalService;

    /**
     * 获取返利投所有用户的投资记录
     * @param fanLiTouRequestDTO
     * @return
     */
    @Override
    public FanLiTouInvestResponseDTO getInvestRecord(FanLiTouRequestDTO fanLiTouRequestDTO) {
        return fanLiTouLocalService.getInvestRecord(fanLiTouRequestDTO);
    }

    /**
     * 获取某时间段返利投用户的提前还款记录
     * @param fanLiTouRequestDTO
     * @return
     */
    @Override
    public FanLiTouInvestResponseDTO getRepayRecord(FanLiTouRequestDTO fanLiTouRequestDTO) {
        return fanLiTouLocalService.getRepayRecord(fanLiTouRequestDTO);
    }




}
